package com.zts.base.exception;

import org.springframework.context.MessageSource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * Created by Zhangkh on 2017/6/1.
 */
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public class InternalServerErrorException extends CommonException {
    private static final String DEFAULT_CODE = CommonExceptionCode.SERVER_ERROR;

    public InternalServerErrorException() {
        super(DEFAULT_CODE);
        setCode(DEFAULT_CODE);
    }

    public InternalServerErrorException(String message, Object... args) {
        super(message, args);
        setCode(DEFAULT_CODE);
    }

    public InternalServerErrorException(Throwable cause) {
        super(cause, DEFAULT_CODE);
        setCode(DEFAULT_CODE);
    }

    public InternalServerErrorException(Throwable cause, String message, Object... args) {
        super(cause, message, args);
        setCode(DEFAULT_CODE);
    }

    public InternalServerErrorException(MessageSource messageSource, Object... args) {
        super(messageSource, DEFAULT_CODE, args);
    }

    public InternalServerErrorException(Throwable cause, MessageSource messageSource, Object... args) {
        super(cause, messageSource, DEFAULT_CODE, args);
    }
}
